﻿using System;

namespace Outfish {
	
	/// <summary>
	/// Provides all info (except cookies) required to make a web request
	/// </summary>
	public interface IScrapeRequest	{
		
		/// <summary>
		/// Uri to submit the request
		/// </summary>
		Uri Uri{ get; }
		
		/// <summary>
		/// GET or POST
		/// </summary>
		string Method{ get; }

		/// <summary>
		/// Data to include in a POST request
		/// </summary>
		IPostData PostData{ get; }
		
		/// <summary>
		/// Where the page came from. May return null.
		/// </summary>
		string Referrer{ get; }
		
		/// <summary>
		/// If false, then redirection will automatically be performed when necessary, returning the final page.
		/// If true, 
		/// 	and server issues a redirect, 
		/// 	and scraper has disabled framework redirection, 
		/// 	then we will get redirect command back.
		/// </summary>
		bool IgnoreRedirection{ get; }
		
		/// <summary>
		/// The specific timeout in milliseconds to use for this request.  Non-null overrides default timeout in scraper.
		/// </summary>
		int? Timeout{ get; }
		
	}
}
